/*
 * Copyright(c) 2018-? the original author[Wien(luweien@aliyun.com)] or authors.
 *
 */
package org.doll.it.linde.domain;

import java.util.List;
import java.util.TreeMap;

import org.doll.it.base.domain.DollDO;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 类型DO，包含一些自定义设置
 * 
 * @author Wien(luweien@aliyun.com)
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
@Document
public class TypeDO extends DollDO {

	private static final long serialVersionUID = -3696636762109132736L;

	/**
	 * 名称
	 */
	@Indexed(unique = true)
	private String name;

	/**
	 * 显示名称
	 */
	private String displayName;

	/**
	 * 图标
	 */
	private String icon;

	/**
	 * 描述
	 */
	private String description;

	/**
	 * 状态
	 */
	private List<Long> stateIds;

	/**
	 * 该类型使用的所有字段
	 */
	private List<Long> usingFieldIds;

	/**
	 * 必填字段
	 */
	private List<Long> requiredFieldIds;

	/**
	 * 只读字段
	 */
	private List<Long> readOnlyFieldIds;

	/**
	 * 字段默认值
	 */
	private TreeMap<Long, String> defaultValues;

	/**
	 * 布局
	 */
	private String layout;

	/**
	 * 流程
	 */
	private TreeMap<Long, List<Long>> workflow;

}
